package cn.com.zetatech.loader.common.db;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import lombok.Data;

/**
 * 默认数据源，必须非空
 */
@Component
@ConfigurationProperties(prefix = "spring.datasource")
@Data
public class DefaultDBConfig extends MybatisDBConfig {

    private String driverClassName;

    private String url;

    private String username;

    private String password;
    
    private String dbType;
    
    private String mapping;

    private String connectionTestQuery;
    
    @Override
    public String toString() {
        return getDriverClassName() + "_" + getUrl() + "_" + getUsername() + "_" + getPassword() + "_" + getDbType();
    }
}
